<!-- script for ckeditor <END_DECRIPT_TAG>
<script type="text/javascript" src="{$base_media}/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="{$base_media}/ckeditor/ckfinder/ckfinder.js"></script>
<START_DECRIPT_TAG> end script for ckeditor -->
<script type="text/javascript" charset="utf-8">
        // tabbed forms box
        $(function () {ldelim}
            var tabContainers = $('div#forms > div.innerContent'); // change div#forms to your new div id (example:div#pages) if you want to use tabs on another page or div.
            tabContainers.hide().filter(':first').show();

            $('ul.switcherTabs a').click(function () {ldelim}
                tabContainers.hide();
                tabContainers.filter(this.hash).show();
                $('ul.switcherTabs li').removeClass('selected');
                $(this).parent().addClass('selected');
                return false;
            {rdelim}).filter(':first').click();
        {rdelim});

        function checkForm()
        {ldelim}
            if (jQuery.trim($(":text").val()) == '') {ldelim}
                alert('Bạn chưa nhập Danh mục Sản phẩm');
                return false;
            {rdelim}

            return true;
        {rdelim}

        function executeCancel()
        {ldelim}
            window.history.back(-1);
        {rdelim}
        /**
         * chooseCategory
         */
		function chooseCategory(val)
		{ldelim}
			if (isNaN(val) || val < 0) {ldelim}
				alert('Dữ liệu không hợp lệ');
				return false;
			{rdelim}
			$('#parent_category_id').val(val);
		{rdelim}
</script>

<div id="leftBox">
{if $msgBoxDisp != ''}
<div class="{$clsType}Box" style="display:{$msgBoxDisp}">
  <div class="{$clsType}BoxTop">&nbsp;</div>
      {foreach from=$messages item=arrMsg}
        {foreach from=$arrMsg item=msg}
        <div class="msgBoxContent {$clsIcon}">
          <p>{$msg}</p>
          </div>
      {/foreach}
    {/foreach}
</div>
{/if}
<form id="mainForm" name="mainForm" method="post" action="{$actionForm}">
<div class="contentBox" id="forms">
  <div class="contentBoxTop">
    <h3>##TEM_ADD_EDIT## Danh mục Sản Phẩm</h3>
    <ul class="switcherTabs">
    {foreach item=arrLang from=$langList}
        {if $arrLang.default eq 1}
          <li class="selected"><a href="#box-{$arrLang.id}">{$arrLang.name}</a></li>
      {else}
          <li><a href="#box-{$arrLang.id}">{$arrLang.name}</a></li>
      {/if}
    {/foreach}
    </ul>
  </div>
	<div style="padding-left:12px;padding-top:20px;">
		<div>Danh mục lớn&nbsp;
			<select name="parent_category" id="parent_category" onchange="chooseCategory(this.value);">
				<option value="0">Danh mục gốc</option>
			{foreach from=$rootCategory item=category}
				<option value="{$category->category_id}" {if $currentParentId == $category->category_id}selected{/if}>{$category->category_name|escape}</option>
			{/foreach}
			</select>
		</div>
	</div>
  {foreach item=arrLang from=$langList}
      <div class="innerContent" id="box-{$arrLang.id}">

          <p>##PRODUCT_CATEGORY_TEXT_FIELD_TITLE_4##<br>
<label class="mediumInput">
<input type="text" name="category_name[{$arrLang.id}]" id="category_name{$arrLang.id}" value="{$arrLang.category_name|escape}" size="51">
</label>
</p>
          <p>
            <input name="" type="image" src="{$base_media}/images/bt_submit.gif" onclick="return checkForm();" />
          </p>

      </div>
  {/foreach}

</div>
<input type="hidden" name="category_id" id="category_id" value="{$category_id}"/>
<input type="hidden" name="parent_category_id" id="parent_category_id" value="{$currentParentId}"/>
</form>
</div>
<script type="text/javascript" charset="utf-8">

</script>
<div id="sidebar" class="rightBoxes">
  <div class="rightBoxesTop">
    <h3>##LIST_FUNC##</h3>
  </div>
  <div class="rightContent">
    <ul id="sidebarLinks">
      <li><a href="javascript:void(0);" onclick="javascript:executeCancel()">##SUBMIT_CANCEL##</a></li>
    </ul>
  </div>
</div>
<!-- end of #sidebar -->